package com.christina.service.application.model;

import lombok.Data;
import lombok.Builder;
import lombok.Getter;

import java.time.LocalDateTime;
import java.util.Map;

/**
 * 统一请求模型
 * 
 * @author Christina
 */
@Data
@Builder
public class UnifiedRequest {
    
    /**
     * 用户ID
     */
    private Long userId;
    
    /**
     * 会话ID
     */
    private String sessionId;
    
    /**
     * 用户输入
     */
    private String userInput;
    
    /**
     * 请求类型
     */
    private RequestType requestType;
    
    /**
     * 请求时间
     */
    private LocalDateTime requestTime;
    
    /**
     * 客户端信息
     */
    private ClientInfo clientInfo;
    
    /**
     * 额外参数
     */
    private Map<String, Object> extraParameters;
    
    /**
     * 请求类型
     */
    @Getter
    public enum RequestType {
        TEXT("文本请求"),
        VOICE("语音请求"),
        IMAGE("图像请求"),
        MULTIMODAL("多模态请求");
        
        private final String description;
        
        RequestType(String description) {
            this.description = description;
        }

    }
    
    /**
     * 客户端信息
     */
    @Data
    @Builder
    public static class ClientInfo {
        private String platform;    // web, mobile, desktop
        private String deviceType;  // phone, tablet, computer
        private String userAgent;
        private String ipAddress;
        private String location;
        private String language;
    }
}